From 31f17ade3bdebdcbb01a36c7809b0cea3e5c2b40 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Thu, 26 Mar 2020 08:04:08 -0600 Subject: [PATCH] convert geojson format to Format class. (#522) * convert geojson format to Format class. use gpsbable::File instead of QFile for input. This results in better error messages. use gpsbabel::File for output instead of gbfile. * detect and log parser errors in geojson reader. --- CMakeLists.txt | 1 + GPSBabel.pro | 1 + Makefile.in | 68 +++++++++++----------- geojson.cc | 151 +++++++++++++++++++++---------------------------- geojson.h | 108 +++++++++++++++++++++++++++++++++++ vecs.h | 4 +- 6 files changed, 210 insertions(+), 123 deletions(-) create mode 100644 geojson.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 2aa1ec612..a3b851c00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,6 +121,7 @@ set(HEADERS gbser.h gbser_private.h gbversion.h + geojson.h ggv_bin.h gpx.h grtcirc.h diff --git a/GPSBabel.pro b/GPSBabel.pro index 051e3c7e7..1a86a5825 100644 --- a/GPSBabel.pro +++ b/GPSBabel.pro @@ -106,6 +106,7 @@ HEADERS = \ gbser.h \ gbser_private.h \ gbversion.h \ + geojson.h \ ggv_bin.h \ gpx.h \ grtcirc.h \ diff --git a/Makefile.in b/Makefile.in index f04c64080..3d6652321 100644 --- a/Makefile.in +++ b/Makefile.in @@ -510,13 +510,13 @@ filter_vecs.o: filter_vecs.cc defs.h config.h zlib/zlib.h zlib/zconf.h \ duplicate.h height.h heightgrid.h interpolate.h nukedata.h polygon.h \ position.h radius.h reverse_route.h smplrout.h sort.h stackfilter.h \ swapdata.h trackfilter.h transform.h validate.h gbversion.h vecs.h \ - format.h ggv_bin.h gpx.h src/core/file.h src/core/xmlstreamwriter.h \ - src/core/xmltag.h shape.h shapelib/shapefil.h yahoo.h xmlgeneric.h \ - legacyformat.h mynav.h xcsv.h garmin_fs.h jeeps/gps.h jeeps/../defs.h \ - jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h \ - jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \ - jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ - src/core/textstream.h + format.h geojson.h src/core/file.h ggv_bin.h gpx.h \ + src/core/xmlstreamwriter.h src/core/xmltag.h legacyformat.h mynav.h \ + shape.h shapelib/shapefil.h xcsv.h garmin_fs.h jeeps/gps.h \ + jeeps/../defs.h jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gpssend.h \ + jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ + jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ + jeeps/gpsrqst.h src/core/textstream.h yahoo.h xmlgeneric.h formspec.o: formspec.cc defs.h config.h zlib/zlib.h zlib/zconf.h \ formspec.h inifile.h gbfile.h session.h src/core/datetime.h \ src/core/optional.h @@ -534,9 +534,9 @@ garmin.o: garmin.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ jeeps/gpsrqst.h garmin_tables.h grtcirc.h jeeps/gpsserial.h vecs.h \ - ggv_bin.h gpx.h src/core/file.h src/core/xmlstreamwriter.h \ - src/core/xmltag.h shape.h shapelib/shapefil.h yahoo.h xmlgeneric.h \ - legacyformat.h mynav.h xcsv.h src/core/textstream.h + geojson.h src/core/file.h ggv_bin.h gpx.h src/core/xmlstreamwriter.h \ + src/core/xmltag.h legacyformat.h mynav.h shape.h shapelib/shapefil.h \ + xcsv.h src/core/textstream.h yahoo.h xmlgeneric.h garmin_device_xml.o: garmin_device_xml.cc defs.h config.h zlib/zlib.h \ zlib/zconf.h formspec.h inifile.h gbfile.h session.h \ src/core/datetime.h src/core/optional.h garmin_device_xml.h \ @@ -594,7 +594,7 @@ geo.o: geo.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ src/core/file.h geojson.o: geojson.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \ - src/core/file.h + geojson.h format.h src/core/file.h ggv_bin.o: ggv_bin.cc ggv_bin.h defs.h config.h zlib/zlib.h zlib/zconf.h \ formspec.h inifile.h gbfile.h session.h src/core/datetime.h \ src/core/optional.h format.h @@ -816,26 +816,26 @@ maggeo.o: maggeo.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ magproto.o: magproto.cc defs.h config.h zlib/zlib.h zlib/zconf.h \ formspec.h inifile.h gbfile.h session.h src/core/datetime.h \ src/core/optional.h explorist_ini.h format.h gbser.h magellan.h vecs.h \ - ggv_bin.h gpx.h src/core/file.h src/core/xmlstreamwriter.h \ - src/core/xmltag.h shape.h shapelib/shapefil.h yahoo.h xmlgeneric.h \ - legacyformat.h mynav.h xcsv.h garmin_fs.h jeeps/gps.h jeeps/../defs.h \ - jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h \ - jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \ - jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ - src/core/textstream.h + geojson.h src/core/file.h ggv_bin.h gpx.h src/core/xmlstreamwriter.h \ + src/core/xmltag.h legacyformat.h mynav.h shape.h shapelib/shapefil.h \ + xcsv.h garmin_fs.h jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h \ + jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ + jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h src/core/textstream.h \ + yahoo.h xmlgeneric.h main.o: main.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \ cet_util.h csv_util.h filter.h filter_vecs.h arcdist.h bend.h \ discard.h duplicate.h height.h heightgrid.h interpolate.h nukedata.h \ polygon.h position.h radius.h reverse_route.h smplrout.h sort.h \ stackfilter.h swapdata.h trackfilter.h transform.h validate.h format.h \ - src/core/file.h src/core/usasciicodec.h vecs.h ggv_bin.h gpx.h \ - src/core/xmlstreamwriter.h src/core/xmltag.h shape.h \ - shapelib/shapefil.h yahoo.h xmlgeneric.h legacyformat.h mynav.h xcsv.h \ - garmin_fs.h jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h \ - jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ - jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h src/core/textstream.h + src/core/file.h src/core/usasciicodec.h vecs.h geojson.h ggv_bin.h \ + gpx.h src/core/xmlstreamwriter.h src/core/xmltag.h legacyformat.h \ + mynav.h shape.h shapelib/shapefil.h xcsv.h garmin_fs.h jeeps/gps.h \ + jeeps/../defs.h jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gpssend.h \ + jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ + jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ + jeeps/gpsrqst.h src/core/textstream.h yahoo.h xmlgeneric.h mapasia.o: mapasia.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h mapbar_track.o: mapbar_track.cc defs.h config.h zlib/zlib.h zlib/zconf.h \ @@ -966,7 +966,7 @@ skytraq.o: skytraq.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ gbser.h smplrout.o: smplrout.cc defs.h config.h zlib/zlib.h zlib/zconf.h \ formspec.h inifile.h gbfile.h session.h src/core/datetime.h \ - src/core/optional.h grtcirc.h smplrout.h filter.h + src/core/optional.h smplrout.h filter.h grtcirc.h sort.o: sort.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \ sort.h filter.h @@ -1046,14 +1046,14 @@ vcf.o: vcf.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ jeeps/gpsmath.h jeeps/gpsport.h vecs.o: vecs.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \ - vecs.h format.h ggv_bin.h gpx.h src/core/file.h \ - src/core/xmlstreamwriter.h src/core/xmltag.h shape.h \ - shapelib/shapefil.h yahoo.h xmlgeneric.h legacyformat.h mynav.h xcsv.h \ - garmin_fs.h jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h \ - jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ - jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h src/core/textstream.h \ - gbversion.h src/core/logging.h + vecs.h format.h geojson.h src/core/file.h ggv_bin.h gpx.h \ + src/core/xmlstreamwriter.h src/core/xmltag.h legacyformat.h mynav.h \ + shape.h shapelib/shapefil.h xcsv.h garmin_fs.h jeeps/gps.h \ + jeeps/../defs.h jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gpssend.h \ + jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ + jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ + jeeps/gpsrqst.h src/core/textstream.h yahoo.h xmlgeneric.h gbversion.h \ + src/core/logging.h vidaone.o: vidaone.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h vitosmt.o: vitosmt.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ diff --git a/geojson.cc b/geojson.cc index 9776f5fdf..8f31744f5 100644 --- a/geojson.cc +++ b/geojson.cc @@ -16,57 +16,38 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "defs.h" -#include "src/core/file.h" -#include -#include -#include -static gbfile* ofd; -static QString input_file_name; -static const char MYNAME[] = "geojson"; -static char* compact_opt = nullptr; -static QJsonObject* track_object = nullptr; -static QJsonArray* track_coords = nullptr; +#include // for QByteArray +#include // for operator|, QIODevice, QIODevice::ReadOnly, QIODevice::Text +#include // for QJsonArray +#include // for QJsonDocument, QJsonDocument::Compact, QJsonDocument::Indented, QJsonDocument::JsonFormat +#include // for QJsonObject +#include // for QJsonParseError +#include // for QJsonValue +#include // for QJsonValueRef -static const QString FEATURE_COLLECTION = QStringLiteral("FeatureCollection"); -static const QString FEATURE = QStringLiteral("Feature"); -static const QString POINT = QStringLiteral("Point"); -static const QString MULTIPOINT = QStringLiteral("MultiPoint"); -static const QString LINESTRING = QStringLiteral("LineString"); -static const QString MULTILINESTRING = QStringLiteral("MultiLineString"); -static const QString POLYGON = QStringLiteral("Polygon"); -static const QString MULTIPOLYGON = QStringLiteral("MultiPolygon"); -static const QString TYPE = QStringLiteral("type"); -static const QString FEATURES = QStringLiteral("features"); -static const QString COORDINATES = QStringLiteral("coordinates"); -static const QString GEOMETRY = QStringLiteral("geometry"); -static const QString PROPERTIES = QStringLiteral("properties"); -static const QString NAME = QStringLiteral("name"); -static const QString DESCRIPTION = QStringLiteral("description"); -static const QString URL = QStringLiteral("url"); -static const QString URLNAME = QStringLiteral("urlname"); +#include "defs.h" +#include "geojson.h" +#include "src/core/file.h" // for File +#include "src/core/logging.h" // for Fatal -static QVector geojson_args = { - {"compact", &compact_opt, "Compact Output. Default is off.", - nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr } , -}; -static void -geojson_rd_init(const QString& fname) { - input_file_name = fname; +void +GeoJsonFormat::rd_init(const QString& fname) { + ifd = new gpsbabel::File(fname); + ifd->open(QIODevice::ReadOnly | QIODevice::Text); } -static QJsonArray* feature_collection = nullptr; - -static void -geojson_wr_init(const QString& fname) { +void +GeoJsonFormat::wr_init(const QString& fname) { feature_collection = new QJsonArray; - ofd = gbfopen(fname, "w", MYNAME); + ofd = new gpsbabel::File(fname); + ofd->open(QIODevice::WriteOnly); } -static void -geojson_waypt_pr(const Waypoint* waypoint) { +void +GeoJsonFormat::geojson_waypt_pr(const Waypoint* waypoint) const +{ QJsonObject geometry; geometry[TYPE] = POINT; QJsonArray coordinates; @@ -105,30 +86,32 @@ geojson_waypt_pr(const Waypoint* waypoint) { feature_collection->append(feature); } -static void -geojson_rd_deinit() { - gbfclose(ofd); - ofd = nullptr; +void +GeoJsonFormat::rd_deinit() { + ifd->close(); + delete ifd; + ifd = nullptr; } -static void -geojson_wr_deinit() { +void +GeoJsonFormat::wr_deinit() { QJsonObject object; object[TYPE] = FEATURE_COLLECTION; object[FEATURES] = *feature_collection; QJsonDocument save(object); QJsonDocument::JsonFormat style = compact_opt ? QJsonDocument::Compact : QJsonDocument::Indented; - gbfputs(save.toJson(style),ofd); + ofd->write(save.toJson(style)); + ofd->close(); - gbfclose(ofd); + delete ofd; ofd = nullptr; delete feature_collection; feature_collection = nullptr; } -static Waypoint* -waypoint_from_coordinates(const QJsonArray& coordinates) +Waypoint* +GeoJsonFormat::waypoint_from_coordinates(const QJsonArray& coordinates) { auto waypoint = new Waypoint(); waypoint->latitude = coordinates.at(1).toDouble(); @@ -140,8 +123,8 @@ waypoint_from_coordinates(const QJsonArray& coordinates) return waypoint; } -static void -routes_from_polygon_coordinates(const QJsonArray& polygon) +void +GeoJsonFormat::routes_from_polygon_coordinates(const QJsonArray& polygon) { for (auto && lineStringIterator : polygon) { @@ -156,15 +139,14 @@ routes_from_polygon_coordinates(const QJsonArray& polygon) } } -static void -geojson_read() { - QFile file; - file.setFileName(input_file_name); - file.open(QIODevice::ReadOnly | QIODevice::Text); - QString file_content = file.readAll(); - file.close(); +void +GeoJsonFormat::read() { + QString file_content = ifd->readAll(); QJsonParseError error{}; QJsonDocument document = QJsonDocument::fromJson(file_content.toUtf8(), &error); + if (error.error != QJsonParseError::NoError) { + Fatal().nospace() << MYNAME << ": GeoJSON parse error in " << ifd->fileName() << ": " << error.errorString(); + } QJsonObject rootObject = document.object(); if (rootObject[TYPE] != FEATURE_COLLECTION) @@ -267,7 +249,7 @@ geojson_read() { } -static void geojson_track_hdr(const route_head* track) { +void GeoJsonFormat::geojson_track_hdr(const route_head* track) { track_object = new QJsonObject(); (*track_object)[TYPE] = FEATURE; @@ -280,7 +262,8 @@ static void geojson_track_hdr(const route_head* track) { (*track_object)[PROPERTIES] = properties; } -static void geojson_track_disp(const Waypoint* trackpoint) { +void GeoJsonFormat::geojson_track_disp(const Waypoint* trackpoint) const +{ QJsonArray coords; coords.append(trackpoint->longitude); @@ -291,7 +274,7 @@ static void geojson_track_disp(const Waypoint* trackpoint) { (*track_coords).append(coords); } -static void geojson_track_tlr(const route_head*) { +void GeoJsonFormat::geojson_track_tlr(const route_head* /*unused*/) { QJsonObject geometry; geometry[TYPE] = LINESTRING; geometry[COORDINATES] = *track_coords; @@ -303,28 +286,22 @@ static void geojson_track_tlr(const route_head*) { track_coords = nullptr; } -static void -geojson_write() { - waypt_disp_all(geojson_waypt_pr); - track_disp_all(geojson_track_hdr, geojson_track_tlr, geojson_track_disp); +void +GeoJsonFormat::write() { + auto geojson_waypt_pr_lambda = [this](const Waypoint* waypointp)->void { + geojson_waypt_pr(waypointp); + }; + waypt_disp_all(geojson_waypt_pr_lambda); + + auto geojson_track_hdr_lambda = [this](const route_head* rte)->void { + geojson_track_hdr(rte); + }; + auto geojson_track_tlr_lambda = [this](const route_head* rte)->void { + geojson_track_tlr(rte); + }; + auto geojson_track_disp_lambda = [this](const Waypoint* waypointp)->void { + geojson_track_disp(waypointp); + }; + track_disp_all(geojson_track_hdr_lambda, geojson_track_tlr_lambda, geojson_track_disp_lambda); } -ff_vecs_t geojson_vecs = { - ff_type_file, - { - (ff_cap)(ff_cap_read | ff_cap_write) /* waypoints */, - (ff_cap)(ff_cap_read | ff_cap_write) /* tracks */, - (ff_cap)(ff_cap_read | ff_cap_write) /* routes */, - }, - geojson_rd_init, - geojson_wr_init, - geojson_rd_deinit, - geojson_wr_deinit, - geojson_read, - geojson_write, - nullptr, - &geojson_args, - CET_CHARSET_UTF8, 0 /* CET-REVIEW */ - , NULL_POS_OPS, - nullptr -}; diff --git a/geojson.h b/geojson.h new file mode 100644 index 000000000..e870a6dfe --- /dev/null +++ b/geojson.h @@ -0,0 +1,108 @@ +/* + Copyright (C) 2016 Robert Lipe, robertlipe+source@gpsbabel.org + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + */ +#ifndef GEOJSON_H_INCLUDED_ +#define GEOJSON_H_INCLUDED_ + +#include // for QJsonArray +#include // for QJsonObject +#include // for QStaticStringData +#include // for QString, QStringLiteral +#include // for QVector + +#include "defs.h" +#include "format.h" // for Format +#include "src/core/file.h" + +class GeoJsonFormat : public Format +{ +public: + QVector* get_args() override + { + return &geojson_args; + } + + ff_type get_type() const override + { + return ff_type_file; + } + + QVector get_cap() const override + { + return FF_CAP_RW_ALL; + } + + QString get_encode() const override + { + return CET_CHARSET_UTF8; + } + + int get_fixed_encode() const override + { + return 0; + } + + void rd_init(const QString& fname) override; + void read() override; + void rd_deinit() override; + void wr_init(const QString& fname) override; + void write() override; + void wr_deinit() override; + + void geojson_waypt_pr(const Waypoint* waypoint) const; + static Waypoint* waypoint_from_coordinates(const QJsonArray& coordinates); + void routes_from_polygon_coordinates(const QJsonArray& polygon); + void geojson_track_hdr(const route_head* track); + void geojson_track_disp(const Waypoint* trackpoint) const; + void geojson_track_tlr(const route_head* unused); + +private: +gpsbabel::File* ifd{nullptr}; +gpsbabel::File* ofd{nullptr}; +const char* MYNAME = "geojson"; +char* compact_opt = nullptr; +QJsonObject* track_object = nullptr; +QJsonArray* track_coords = nullptr; + +const QString FEATURE_COLLECTION = QStringLiteral("FeatureCollection"); +const QString FEATURE = QStringLiteral("Feature"); +const QString POINT = QStringLiteral("Point"); +const QString MULTIPOINT = QStringLiteral("MultiPoint"); +const QString LINESTRING = QStringLiteral("LineString"); +const QString MULTILINESTRING = QStringLiteral("MultiLineString"); +const QString POLYGON = QStringLiteral("Polygon"); +const QString MULTIPOLYGON = QStringLiteral("MultiPolygon"); +const QString TYPE = QStringLiteral("type"); +const QString FEATURES = QStringLiteral("features"); +const QString COORDINATES = QStringLiteral("coordinates"); +const QString GEOMETRY = QStringLiteral("geometry"); +const QString PROPERTIES = QStringLiteral("properties"); +const QString NAME = QStringLiteral("name"); +const QString DESCRIPTION = QStringLiteral("description"); +const QString URL = QStringLiteral("url"); +const QString URLNAME = QStringLiteral("urlname"); + +QVector geojson_args = { + {"compact", &compact_opt, "Compact Output. Default is off.", + nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr } , +}; + +QJsonArray* feature_collection = nullptr; + +}; +#endif // GEOJSON_H_INCLUDED_ diff --git a/vecs.h b/vecs.h index 9e5719fa6..c3952440b 100644 --- a/vecs.h +++ b/vecs.h @@ -29,6 +29,7 @@ #include "defs.h" #include "format.h" +#include "geojson.h" #include "ggv_bin.h" #include "gpx.h" #include "legacyformat.h" @@ -172,7 +173,6 @@ extern ff_vecs_t mapbar_track_vecs; extern ff_vecs_t f90g_track_vecs; extern ff_vecs_t mapfactor_vecs; extern ff_vecs_t energympro_vecs; -extern ff_vecs_t geojson_vecs; extern ff_vecs_t globalsat_sport_vecs; #endif // MAXIMAL_ENABLED @@ -406,7 +406,7 @@ private: LegacyFormat mapfactor_fmt {mapfactor_vecs}; LegacyFormat energympro_fmt {energympro_vecs}; MyNavFormat mynav_fmt; - LegacyFormat geojson_fmt {geojson_vecs}; + GeoJsonFormat geojson_fmt; GgvBinFormat ggv_bin_fmt; LegacyFormat globalsat_sport_fmt {globalsat_sport_vecs}; #endif // MAXIMAL_ENABLED -- 2.30.2